echo.
echo Finding 7-Zip
echo.
set zipexe="%ProgramW6432%\7-zip\7z.exe"
if not exist %zipexe% set zipexe="%ProgramFiles%\7-zip\7z.exe"
if not exist %zipexe% set zipexe="%ProgramFiles(x86)%\7-zip\7z.exe"
if not exist %zipexe% echo Please install 7-Zip!
if not exist %zipexe% goto :EOF

set tempdir="%temp%\DNNDDRMenuTemplates"
set packageoutput=DNNDDRMenuTemplates.zip

rd /s /q %tempdir%
del %packageoutput%

xcopy . %tempdir%\ /e/d/c/y

%zipexe% a -tzip -x!package.bat %packageoutput% %tempdir%\*

set tempdir=
set packageoutput=